import type { App, Plugin } from 'vue'
import button from './naive/button.vue'
import input from './naive/input.vue'
import card from './naive/card.vue'
import select from './naive/select.vue'
import switchComp from './naive/switch.vue'
import checkbox from './naive/checkbox.vue'

// 大驼峰命名导出，方便导入使用
export const VButton = button
export const VInput = input
export const VCard = card
export const VSelect = select
export const VSwitch = switchComp
export const VCheckbox = checkbox

// 保留原有小写导出，保持向后兼容
export { button, input, card, select, switchComp as switch, checkbox }

// 插件式安装
const install: Plugin = {
  install(app: App) {
    app.component('v-button', button)
    app.component('v-input', input)
    app.component('v-card', card)
    app.component('v-select', select)
    app.component('v-switch', switchComp)
    app.component('v-checkbox', checkbox)
  }
}

export default install